﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="EditEvent.aspx.cs" Inherits="App.EditEvent" Theme="Alpha" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:Panel ID="Panel1" runat="server">
        <h1>Změna údajů akce</h1>

        <asp:Label ID="Label1" runat="server" CssClass="formMessage" Visible="False"></asp:Label>
        <asp:Panel ID="Panel3" runat="server">
            <div class="formField">
                <asp:Label ID="LabelEventName" runat="server" Text="Název akce:"></asp:Label>
                <asp:TextBox ID="TextBoxEventName" runat="server" CssClass="right" 
                    MaxLength="50"></asp:TextBox>
            </div>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBoxEventName" ErrorMessage="Název akce musí být zadán" ValidationGroup="EventValidation"></asp:RequiredFieldValidator>        
            <div class="formField">
                <asp:Label ID="LabelDate" runat="server" Text="Datum konání:"></asp:Label>
                <asp:TextBox ID="TextBoxDate" runat="server" MaxLength="50"></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBoxDate" Format="dd.MM.yyyy" TodaysDateFormat="d, MMMM, yyyy"></ajaxToolkit:CalendarExtender>
            </div> 
            <div class="formField">
                <asp:Label ID="LabelAdress" runat="server" Text="Místo konání:"></asp:Label>
                <asp:TextBox ID="TextBoxAdress" runat="server" MaxLength="50"></asp:TextBox>
            </div>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBoxAdress" ErrorMessage="Místo konání musí být zadáno" ValidationGroup="EventValidation"></asp:RequiredFieldValidator>        
<%--            <div class="formField">--%>
<%--                <asp:Label ID="LabelPrice" runat="server" Text="Cena:"></asp:Label>
                <asp:TextBox ID="TextBoxPrice" runat="server" MaxLength="9"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Custom"
                        TargetControlID="TextBoxPrice" ValidChars="0123456789"></ajaxToolkit:FilteredTextBoxExtender>--%>
<%--            </div>--%>
<%--            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBoxPrice" ErrorMessage="Cena musí být zadána" ValidationGroup="EventValidation"></asp:RequiredFieldValidator> --%>       
            <div class="formField">
                <asp:Label ID="LabelSeats" runat="server" Text="Počet míst:"></asp:Label>
                <asp:TextBox ID="TextBoxSeats" runat="server" MaxLength="9"></asp:TextBox>
                 <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TextBoxSeats" FilterType="Custom" ValidChars="0123456789"></ajaxToolkit:FilteredTextBoxExtender>
            </div>
            <asp:Label ID="LabelSeatsMissCount" runat="server" Text="Počet míst je menší než počet účastníků" CssClass="formError" Visible="False"/>
            <asp:CompareValidator ID="CompareValidator5" runat= "server" ControlToValidate="TextBoxSeats" 
            ValidationGroup="EventValidation" ErrorMessage="Minimální počet účástníků musí být 1" 
                    Operator="GreaterThan" ValueToCompare="0"></asp:CompareValidator>  
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBoxSeats" ErrorMessage="Minimální počet účástníků musí být 1" ValidationGroup="EventValidation"></asp:RequiredFieldValidator>                 
            <div class="formTextarea">
                <asp:Label ID="LabelDescription" runat="server" Text="Popis akce:"></asp:Label>
                <asp:TextBox ID="TextBoxDescription" runat="server" TextMode="MultiLine"></asp:TextBox>
            </div>
            <asp:RegularExpressionValidator ID="regComments" runat="server" 
                    ControlToValidate="TextBoxDescription" 
                    ErrorMessage="Popis akce může obsahovat pouze 100 znaků" 
                    ValidationExpression="^[\s\S]{0,100}$" ValidationGroup="EventValidation"></asp:RegularExpressionValidator>
            <div class="formButton">
                <asp:Button ID="Button1" runat="server" Height="23px" onclick="Button1_Click" Text="Uložit" ValidationGroup="EventValidation" />
            </div>
        </asp:Panel>
    </asp:Panel>

</asp:Content>
